﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<% DepartmentModel Department = ViewData["Department"] as DepartmentModel;%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Edit</title>
		<script src="/Scripts/jquery.js" type="text/javascript"></script>
			<script src="/Scripts/common.js" type="text/javascript"></script>
</head>
<body>
<form method="post" action="save">
	 <input id="parentID" name="parentID" type="hidden"  value="<%=ViewData["ParentName"]%>"/>
    <input id="DepartmentID" name="DepartmentID" type="hidden"  value="<%=(Department!=null)?Department.DepartmentID.ToString():"" %>"/>
	<table class="tb-form">
        <tr>
            <td class="tb-f-lable">
                <span class="org">*</span>选择上级部门：
            </td>
            <td>
                <input type="button" id="selPartmentID" name="selPartmentID" class="i-btn3" value="选择上级部门"
                    onclick="selDepartment();" />
                    <span id="departmentName"><%=ViewData["ParentName"]%></span>
            </td>
        </tr>   
        <tr>
            <td class="tb-f-lable" style="width: 100px;">
                <span class="org">*</span>部门名称
            </td>
            <td>
			<input id="Text1" name="Name" type="text"  value="<%=(Department!=null)?Department.Name:"" %>"  class="input-style-d" />
            </td>
        </tr>
        <tr>
            <td class="tb-f-lable">
			排序值
            </td>
            <td>
            <input id="Text2" name="SortOrder" type="text"  value="<%=(Department!=null)?Department.SortOrder.ToString():"" %>" class="input-style-d"/>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center;">
             <input type="submit" value="保存" class="i-btn3" />
            </td>
        </tr>
    </table>
	</form>
</body>
</html>
    <script src="/Scripts/Department/add.js" type="text/javascript"></script>